/**
 * Created by Administrator on 2017/3/15 0015.
 */
var ParticleDemo={
    create:function () {
        var page={};

        page.emitterContainer = new PIXI.ParticleContainer();
        page.emitterContainer.setProperties({
            scale: true,
            position: true,
            rotation: true,
            uvs: true,
            alpha: true
        });
        // stage.addChild(emitterContainer);

        page.emitter = new PIXI.particles.Emitter(
            page.emitterContainer,
            [new PIXI.Texture.fromImage('assets/images/leaf.png')],
            {
                "alpha": {
                    "start": 1,
                    "end": 0
                },
                "scale": {
                    "start": 0.6,
                    "end": 0.5,
                    "minimumScaleMultiplier": 1
                },
                "color": {
                    "start": "#ffffff",
                    "end": "#ffffff"
                },
                "speed": {
                    "start": 30,
                    "end": 20,
                    "minimumSpeedMultiplier": 1
                },
                "acceleration": {
                    "x": -300,
                    "y": 311
                },
                "maxSpeed": 0,
                "startRotation": {
                    "min": 0,
                    "max": 360
                },
                "noRotation": false,
                "rotationSpeed": {
                    "min": 0,
                    "max": 10
                },
                "lifetime": {
                    "min": 1,
                    "max": 2
                },
                "blendMode": "normal",
                "frequency": 0.001,
                "emitterLifetime": -1,
                "maxParticles": 20,
                "pos": {
                    "x": 300,
                    "y": 300
                },
                "addAtBack": false,
                "spawnType": "rect",
                "spawnRect": {
                    "x": 0,
                    "y": 0,
                    "w": 100,
                    "h": 800
                }
            }
        );
        page.emitter.emit = true;

        return page;
    } 
}
